package com.ktgj.flight.service.impl;

import java.util.List;

import com.ktgj.flight.domain.CabinLevel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.flight.mapper.FlightCabinruleMapper;
import com.ktgj.flight.domain.FlightCabinrule;
import com.ktgj.flight.service.IFlightCabinruleService;

/**
 * 机票舱位退改签规则Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-18
 */
@Service
public class FlightCabinruleServiceImpl implements IFlightCabinruleService 
{
    @Autowired
    private FlightCabinruleMapper flightCabinruleMapper;

    /**
     * 查询机票舱位退改签规则
     * 
     * @param ruleid 机票舱位退改签规则ID
     * @return 机票舱位退改签规则
     */
    @Override
    public FlightCabinrule selectFlightCabinruleById(Long ruleid)
    {
        return flightCabinruleMapper.selectFlightCabinruleById(ruleid);
    }

    /**
     * 查询机票舱位退改签规则列表
     * 
     * @param flightCabinrule 机票舱位退改签规则
     * @return 机票舱位退改签规则
     */
    @Override
    public List<FlightCabinrule> selectFlightCabinruleList(FlightCabinrule flightCabinrule)
    {
        return flightCabinruleMapper.selectFlightCabinruleList(flightCabinrule);
    }

    /**
     * 新增机票舱位退改签规则
     * 
     * @param flightCabinrule 机票舱位退改签规则
     * @return 结果
     */
    @Override
    public int insertFlightCabinrule(FlightCabinrule flightCabinrule)
    {
        return flightCabinruleMapper.insertFlightCabinrule(flightCabinrule);
    }

    /**
     * 修改机票舱位退改签规则
     * 
     * @param flightCabinrule 机票舱位退改签规则
     * @return 结果
     */
    @Override
    public int updateFlightCabinrule(FlightCabinrule flightCabinrule)
    {
        return flightCabinruleMapper.updateFlightCabinrule(flightCabinrule);
    }

    /**
     * 批量删除机票舱位退改签规则
     * 
     * @param ruleids 需要删除的机票舱位退改签规则ID
     * @return 结果
     */
    @Override
    public int deleteFlightCabinruleByIds(Long[] ruleids)
    {
        return flightCabinruleMapper.deleteFlightCabinruleByIds(ruleids);
    }

    /**
     * 删除机票舱位退改签规则信息
     * 
     * @param ruleid 机票舱位退改签规则ID
     * @return 结果
     */
    @Override
    public int deleteFlightCabinruleById(Long ruleid)
    {
        return flightCabinruleMapper.deleteFlightCabinruleById(ruleid);
    }

    @Override
    public CabinLevel queryCabinLevelId(Long cabinLevelId) {
        return flightCabinruleMapper.queryCabinLevelId(cabinLevelId);
    }

    @Override
    public List<FlightCabinrule> queryFlightCabinRule(String airline, String cabin) {
        return flightCabinruleMapper.queryFlightCabinRule(airline, cabin);
    }

    @Override
    public List<CabinLevel> queryCabinLevelList() {
        return flightCabinruleMapper.queryCabinLevelList();
    }

    //查询所有退改签规则
    @Override
    public List<FlightCabinrule> selectFlightCabinRule() {
        return flightCabinruleMapper.selectFlightCabinRule();
    }
}
